application.htmlHTMLudog5ÚπùΔ¢πùΔ¢ÅÅX≥ Monkeybread Realbasic plugin - Documentation - Application

MBS Plugin Documentation

This is the documentation for the Realbasic Plugins from Monkeybreadsoftware.de. You find these plugins and the newest version of this document at http://www.monkeybreadsoftware.de/realbasic inside the plugins section.

This help was last updated on Freitag, 6. September 2002 and covers 2136 items: 126 classes, 2 controls and 583 global functions.

The list of the themes Global methods by category Global methods by name The list of the classes The list of the controls

class Application

class, Application So, 28. Apr 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Extends the Application class inside Realbasic.

ApplicationCreatorCode as string

method, Application So, 28. Apr 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: does allways return nil.
Function: Returns the Creator Code of the application.
Example: msgbox "Hi. This application has the creator code "+ApplicationCreatorCode
Notes:
Only usefull on Mac OS.
If you run your app inside the Realbasic IDE it will return "RBv2" which is Realbasic's Creator code sind Realbasic 2.0.

ApplicationFile as folderitem

method, Application So, 28. Apr 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Gives a folderitem to the applications file.
Example: msgbox "Hi. The file of this application is named "+ApplicationFile.name
Notes: Inside Realbasic points to the Realbasic application.

ApplicationName as string

method, Application So, 28. Apr 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: does allways return nil.
Function: Returns the name of the application.
Example: msgbox "Hi. This application is named "+ApplicationName
Notes: This may not be the exact same name than the filename.

BundleFolder as folderitem

method, Application Mi, 1. Mai 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Does nothing.
Function: Returns a folderitem to the bundle's mail folder.

BundleResourceFolder as folderitem

method, Application Mi, 1. Mai 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Does nothing.
Function: Returns a folderitem to the resource file inside the bundle.

BundleResourceFolderItem(name as string) as folderitem

method, Application Mi, 1. Mai 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Does nothing.
Function: Returns a folderitem to a file inside the bundle.
Notes: Handles multiple languages correctly.

FreeMemory as integer

method, Application Mi, 1. Mai 2002
Mac OS Classic: Works. Mac OS Carbon: -> 0. Windows: -> -1.
Function: Returns the free size of the Application's memory partition.
Example: me.text=format(app.FreeMemory,"0")+" Bytes"

LaunchTime as double

method, Application Mi, 1. Mai 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: -> -1.
Function: Returns the the ticks value at launch time.
Example:
dim d as date

d=new date
d.totalSeconds=d.totalSeconds-(ticks-app.launchTime)/60

me.text=d.longdate+" "+d.longtime
Notes: This value must be converted to the secondsvalue like in the example.

OverlayApplicationDockTileImage(pic as picture,mask as picture) as boolean

method, Graphics & Pictures Plugin version: 2.6 Fr, 30. Aug 2002
Mac OS Classic: -> false. Mac OS Carbon: Works. Windows: -> false.
Function: Adds a picture on top of the application dock title.
Example:
dim p as picture
dim m as picture
dim g as graphics
dim s as string
dim w,h,x as integer

n=n+1 // add one
s=str(n)
m=newpicture(128,128,32)
p=newpicture(128,128,32)

g=p.graphics
g.textsize=24
w=g.stringwidth(s)
h=g.stringheight(s,0)
x=125-w-10
g.foreColor=rgb(255,0,0)
g.fillRoundRect x,10,10+w,10+h,20,20
g.foreColor=rgb(0,0,0)
g.drawstring s,x+5,15+g.textascent

g=m.graphics
g.foreColor=rgb(0,0,0)
g.fillRoundRect x,10,10+w,10+h,20,20

if app.OverlayApplicationDockTileImage(p,m) then
end if

RegisterHelpBook

method, Application Mi, 1. Mai 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Does nothing.
Function: Registers a help book which is inside the bundle.

RestoreApplicationDockTileImage as boolean

method, Graphics & Pictures Plugin version: 2.6 Fr, 30. Aug 2002
Mac OS Classic: -> false. Mac OS Carbon: Works. Windows: -> false.
Function: Restores the application dock tile image.

SetApplicationDockTileImage(pic as picture,mask as picture) as boolean

method, Graphics & Pictures Plugin version: 2.6 Fr, 30. Aug 2002
Mac OS Classic: -> false. Mac OS Carbon: Works. Windows: -> false.
Function: Sets the application dock tile image.

TotalMemory as integer

method, Application Mi, 1. Mai 2002
Mac OS Classic: Works. Mac OS Carbon: -> 0. Windows: -> -1.
Function: Returns the size of the Application's memory partition.
Example: me.text=format(app.TotalMemory,"0")+" Bytes"

Contact

Written 2002 by Christian Schmitz. Feel free to ask or report mistakes to realbasic@macsw.de.
Thanks.

This resource fork intentionally left blank ˇˇ